package cn.edu.scau.cmi.xuchuangxiong.client;

import java.util.Scanner;

import cn.edu.scau.cmi.xuchuangxiong.domain.Meat;
import cn.edu.scau.cmi.xuchuangxiong.factory.*;

public class FactoryClient {
	public  void main() {
		Scanner sc = new Scanner(System.in);
		System.out.println("Beef; Chicken; Pork; ");
		System.out.println("Please input what you want to produce : ");
		String option = sc.nextLine();
		MeatFactory mf = null;
		switch(option)
		{
		case "Beef": mf = new BeefMeatFactory(); break;
		case "Chicken": mf = new ChickenMeatFactory(); break;
		case "Pork": mf = new PorkMeatFactory(); break;
		default: System.out.println("Wrong input");
		}
		Meat produceMeat = mf.produce();
		System.out.println("Produce meat type: ");
		System.out.println(produceMeat.getType());
	} 
}
